﻿@model LogManager.ViewModels.EventsPerPathList

@using MvcContrib.UI.Grid;
@using MvcContrib.Pagination;
@using MvcContrib.UI.Pager;
@using LogManager.Helpers;
@using LogManager.Base

<div class="requests">
    @(Html.Pager(Model.Requests).First("First").Previous("Previous").Next("Next").Last("Last"))
    @(Html.Grid<LogManager.Base.Models.Projections.EventsPerPathProjection>(Model.Requests).Columns(column =>
    {
        column.For(e => e.LogName);
        column.For(e => e.Path);
        column.For(e => e.LastRequest);
        column.For(e => e.Count);
    }).Sort(Model.SortOptions))
    @(Html.Pager(Model.Requests).First("First").Previous("Previous").Next("Next").Last("Last"))
    <br />
</div>

<script type="text/javascript">
    jQuery(document).ready(function () {
        $.ajaxLinkHandler('.requests .pagination a, .requests th a', '.requests', '.requests .grid');
    });
</script>